﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<body>
<#assign active='articleList'/>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form class="form-inline clearfix">
                            <@searchSelect label="状态" name="status" valueMap={"0":"不显示","1":"显示"} isEnd=true></@searchSelect>
                            </form>
                            <div class="form-tool btn-group">
                                <a href="/admin/pic/add" class="btn btn-sm btn-info">
                                    <i class="icon-plus"></i>添加
                                </a>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                <@tableHead names=["标题","链接","排序","状态","添加时间","操作人","操作"]></@tableHead>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <@tableBody model=item propMap={"name":"","url":"","sort":""}></@tableBody>
                                    <td>${item.status!?switch(0,"隐藏",1,"显示","未知")}</td>
                                    <@tableBody model=item propMap={"addtime":"yyyy-MM-dd","username":""}></@tableBody>
                                    <td>
                                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                            <#if item.status == 0>
                                                <a class="btn btn-xs btn-success"
                                                   href="/admin/pic/updateStatus/${item.id}">
                                                    显示
                                                </a>
                                            <#else>
                                                <a class="btn btn-xs btn-danger"
                                                   href="/admin/pic/updateStatus/${item.id}">
                                                    隐藏
                                                </a>
                                            </#if>

                                            <a class="btn btn-xs btn-warning"
                                               href="javascript:if(confirm('确定要删除吗？')){location.href = '/admin/pic/del/${item.id}'}">
                                                删除
                                            </a>
                                            <a class="btn btn-xs btn-info" href="/admin/pic/edit/${item.id}">
                                                详情
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<#include "../include/resource-script.ftl"/>

</html>

